package com.xinzhi.savingpot.task.vo;

import com.xinzhi.savingpot.userinfo.UserInfoVo;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class TaskInfoVo {
//    系统生成
    private Integer taskId;
    private String taskNumber;
//    解析token拿到
    private UserInfoVo uiv = new UserInfoVo();

    @NotEmpty(message = "任务标题不能为空")
    private String taskTitle;
    private TaskCLassVo taskCLassVo = new TaskCLassVo();
    @NotEmpty(message = "可帮忙频次不能为空")
    private String frequency;
    @NotEmpty(message = "可任务次数不能为空")
    private String dec;
    @DecimalMin(value = "0.1",message = "价格不合法")
    private BigDecimal taskUnitPrice;

    @Min(value = 10, message = "任务数量不得少于10个")
    private Integer sumPlaces;
    private Integer remainPlaces = sumPlaces;
//    状态给默认值（待审核）
    private String taskStateName;
//    发布时间系统生成,在service层生成时间
    private Date releaseTime;
    private Date endTime;
//    被查看次数，默认为0
    private Integer numLook = 0;
//    被托管，默认为0，不托管
    private Integer trust = 0;
//    预付金额 = 总数量*任务单价
    private BigDecimal amountAdvanced;

    private List<TaskImg> taskImg = new ArrayList<>();




}
